/***
 *  Copyright (c) 2012 yanghui
 *  Author: yanghui1986527@gmail.com
 *  http://code.google.com/p/gravatar4android/
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.snowdream.gravatar4android.data;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Users may optionally enter a variety of profile information to associate with their Gravatar account. 
 * This information is openly-accessible using a similar process to requesting images.
 * A simple profile link looks like this:
 * <p>
 * http://www.gravatar.com/HASH 
 * <p>
 * where HASH is the email hash of a user. This request will automatically redirect to their username-based URL, 
 * so for example, you might get this: 
 * <p>
 * http://www.gravatar.com/205e460b479e2e5b48aec07710c08d50 --> http://en.gravatar.com/beau 
 * <p>
 * An important point to note is that <b> profile requests will only resolve for the hash of the primary address</b>on an account. 
 * Users may have multiple addresses on a single account, so while a Gravatar image request may return a result,
 * a profile request for the same hash may not.
 *
 * if requested,the result GravatarProfile will be a json string as follows:
 * 
 * <pre>
 * {"entry":
 *        [{"id":"1428",
 *         "hash":"205e460b479e2e5b48aec07710c08d50",
 *         "requestHash":"205e460b479e2e5b48aec07710c08d50",
 *         "profileUrl":"http:\/\/gravatar.com\/beau",
 *         "preferredUsername":"beau",
 *         "thumbnailUrl":"http:\/\/2.gravatar.com\/avatar\/205e460b479e2e5b48aec07710c08d50",
 *         "photos":
 *                 [{"value":"http:\/\/2.gravatar.com\/avatar\/205e460b479e2e5b48aec07710c08d50","type":"thumbnail"},
 *                  {"value":"http:\/\/0.gravatar.com\/userimage\/1428\/9564d785bb3d64c03d26b2de426c4312"},
 *                  {"value":"http:\/\/0.gravatar.com\/userimage\/1428\/a5d0e4d405a047e5b567e488dbc1eb21"},
 *                  {"value":"http:\/\/1.gravatar.com\/userimage\/1428\/fb8f961213a600c323bce0ad3c461a80"},
 *                  {"value":"http:\/\/2.gravatar.com\/userimage\/1428\/feb73c66a51313817aad85ebaba82ba3"}],
 *         "profileBackground":
 *                  {"color":"#274f3d",
 *                   "position":"center",
 *                   "repeat":"repeat",
 *                   "url":"http:\/\/2.gravatar.com\/bg\/1428\/c88c28f0874d564f93983c91de036703"},
 *         "name":{"givenName":"Beau",
 *                  "familyName":"Lebens",
 *                  "formatted":"Beau Lebens"},
 *         "displayName":"Beau Lebens",
 *         "aboutMe":"I am a Code Wrangler at <a href=\"http:\/\/automattic.com\/\">Automattic<\/a>, the makers of WordPress.com, Gravatar, Jetpack Akismet, IntenseDebate, Polldaddy, VideoPress and more. I work on PHP\/MySQL based web applications and love it. I've been doing this kind of thing for 10  years and working on the web for 14 .\n\nWhen I'm not online, I'm an avid practitioner of <a href=\"http:\/\/kravmaga-sf.com\/\">Krav Maga<\/a> and love hiking and camping.",
 *         "currentLocation":"San Francisco, CA 94109, USA",
 *         "phoneNumbers":
 *                  [{"type":"mobile","value":"14152790783"}],
 *         "emails":
 *                  [{"primary":"true","value":"beau@dentedreality.com.au"}],
 *         "ims":
 *                 [{"type":"aim","value":"beaulebens"},
 *                  {"type":"msn","value":"beau@dentedreality.com.au"},
 *                  {"type":"yahoo","value":"beaulebens"},
 *                  {"type":"icq","value":"798818"},
 *                  {"type":"gtalk","value":"beau.lebens@gmail.com"},
 *                  {"type":"skype","value":"borkazoid"}],
 *         "accounts":
 *                  [{"domain":"blogger.com","display":"blogger.com","url":"http:\/\/www.blogger.com\/profile\/16955909532360216492","userid":"16955909532360216492","verified":"true","shortname":"blogger"},
 *                  {"domain":"facebook.com","display":"beaulebens","url":"http:\/\/www.facebook.com\/beaulebens","username":"beaulebens","verified":"true","shortname":"facebook"},
 *                  {"domain":"flickr.com","display":"borkazoid","url":"http:\/\/www.flickr.com\/people\/borkazoid\/","username":"borkazoid","verified":"true","shortname":"flickr"},
 *                  {"domain":"friendfeed.com","display":"beaulebens","url":"http:\/\/friendfeed.com\/beaulebens","username":"beaulebens","verified":"true","shortname":"friendfeed"},
 *                  {"domain":"foursquare.com","display":"foursquare.com","url":"http:\/\/foursquare.com\/user\/3277","userid":"3277","verified":"true","shortname":"foursquare"},
 *                  {"domain":"goodreads.com","display":"beaulebens","url":"http:\/\/www.goodreads.com\/beaulebens","username":"beaulebens","verified":"true","shortname":"goodreads"},
 *                  {"domain":"plus.google.com","display":"plus.google.com","url":"https:\/\/plus.google.com\/100468367545654198427","userid":"100468367545654198427","verified":"true","shortname":"google"},
 *                  {"domain":"gowalla.com","display":"beaulebens","url":"http:\/\/gowalla.com\/users\/beaulebens","username":"beaulebens","verified":"true","shortname":"gowalla"},
 *                  {"domain":"linkedin.com","display":"beaulebens","url":"http:\/\/www.linkedin.com\/in\/beaulebens","username":"beaulebens","verified":"true","shortname":"linkedin"},
 *                  {"domain":"myspace.com","display":"beaulebens","url":"http:\/\/www.myspace.com\/beaulebens","username":"beaulebens","verified":"true","shortname":"myspace"},
 *                  {"domain":"posterous.com","display":"beau","url":"http:\/\/beau.posterous.com","username":"beau","verified":"true","shortname":"posterous"},
 *                  {"domain":"tripit.com","display":"beaulebens","url":"http:\/\/tripit.com\/people\/beaulebens","username":"beaulebens","verified":"true","shortname":"tripit"},
 *                  {"domain":"tumblr.com","display":"beaulebens","url":"http:\/\/beaulebens.tumblr.com\/","username":"beaulebens","verified":"true","shortname":"tumblr"},
 *                  {"domain":"twitter.com","display":"@beaulebens","url":"http:\/\/twitter.com\/beaulebens","username":"beaulebens","verified":"true","shortname":"twitter"},
 *                  {"domain":"vimeo.com","display":"beau","url":"http:\/\/vimeo.com\/beau","username":"beau","verified":"true","shortname":"vimeo"},
 *                  {"domain":"dentedreality.com.au","display":"dentedreality.com.au","url":"http:\/\/dentedreality.com.au\/","username":"dentedreality.com.au","verified":"true","shortname":"wordpress"},
 *                  {"domain":"pulse.yahoo.com","display":"pulse.yahoo.com","url":"http:\/\/pulse.yahoo.com\/_V7GX4AZFSTGGD3RRBWIBWEP7Z4","userid":"_V7GX4AZFSTGGD3RRBWIBWEP7Z4","verified":"true","shortname":"yahoo"},
 *                  {"domain":"youtube.com","display":"beaulebens","url":"http:\/\/www.youtube.com\/user\/beaulebens","username":"beaulebens","verified":"true","shortname":"youtube"}],
 *         "urls":
 *                [{"value":"http:\/\/dentedreality.com.au","title":"Dented Reality"},
 *                {"value":"http:\/\/intensedebate.com","title":"IntenseDebate"},
 *                {"value":"http:\/\/wordpress.com","title":"WordPress.com"},
 *                {"value":"http:\/\/automattic.com","title":"Automattic"},
 *                {"value":"http:\/\/gravatar.com","title":"Gravatar"},
 *                {"value":"http:\/\/sidewalkscribbl.es","title":"SidewalkScribbl.es"}]
 *          }]
 * }
 * </pre>
 */
public class GravatarProfile implements Serializable{

    private static final long serialVersionUID = 4153967625298622832L;
    
    private String id = null;
    
    private String hash = null;
    
    private String requestHash = null;
    
    private String profileUrl = null;
    
    private String preferredUsername = null;
    
    private String thumbnailUrl = null;
    
    private ArrayList<GravatarPhoto> photos = null;
    
    private GravatarBackground profileBackground = null;
    
    private GravatarName name = null;
    
    private String displayName= null;
    
    private String aboutMe = null;
    
    private String currentLocation = null;
    
    private ArrayList<GravatarPhone> phoneNumbers = null;
    
    private ArrayList<GravatarEmail> emails = null;
    
    private ArrayList<GravatarIms>  ims = null;
    
    private ArrayList<GravatarAccount> accounts = null;
    
    private ArrayList<GravatarUrl> urls = null;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHash() {
        return hash;
    }

    public void setHash(String hash) {
        this.hash = hash;
    }

    public String getRequestHash() {
        return requestHash;
    }

    public void setRequestHash(String requestHash) {
        this.requestHash = requestHash;
    }

    public String getProfileUrl() {
        return profileUrl;
    }

    public void setProfileUrl(String profileUrl) {
        this.profileUrl = profileUrl;
    }

    public String getPreferredUsername() {
        return preferredUsername;
    }

    public void setPreferredUsername(String preferredUsername) {
        this.preferredUsername = preferredUsername;
    }

    public String getThumbnailUrl() {
        return thumbnailUrl;
    }

    public void setThumbnailUrl(String thumbnailUrl) {
        this.thumbnailUrl = thumbnailUrl;
    }

    public ArrayList<GravatarPhoto> getPhotos() {
        return photos;
    }

    public void setPhotos(ArrayList<GravatarPhoto> photos) {
        this.photos = photos;
    }

    public GravatarBackground getProfileBackground() {
        return profileBackground;
    }

    public void setProfileBackground(GravatarBackground profileBackground) {
        this.profileBackground = profileBackground;
    }

    public GravatarName getName() {
        return name;
    }

    public void setName(GravatarName name) {
        this.name = name;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getAboutMe() {
        return aboutMe;
    }

    public void setAboutMe(String aboutMe) {
        this.aboutMe = aboutMe;
    }

    public String getCurrentLocation() {
        return currentLocation;
    }

    public void setCurrentLocation(String currentLocation) {
        this.currentLocation = currentLocation;
    }

    public ArrayList<GravatarPhone> getPhoneNumbers() {
        return phoneNumbers;
    }

    public void setPhoneNumbers(ArrayList<GravatarPhone> phoneNumbers) {
        this.phoneNumbers = phoneNumbers;
    }

    public ArrayList<GravatarEmail> getEmails() {
        return emails;
    }

    public void setEmails(ArrayList<GravatarEmail> emails) {
        this.emails = emails;
    }

    public ArrayList<GravatarIms> getIms() {
        return ims;
    }

    public void setIms(ArrayList<GravatarIms> ims) {
        this.ims = ims;
    }

    public ArrayList<GravatarAccount> getAccounts() {
        return accounts;
    }

    public void setAccounts(ArrayList<GravatarAccount> accounts) {
        this.accounts = accounts;
    }

    public ArrayList<GravatarUrl> getUrls() {
        return urls;
    }

    public void setUrls(ArrayList<GravatarUrl> urls) {
        this.urls = urls;
    }
}
